#ifndef PEAKITEM_H
#define PEAKITEM_H
//
#include <qwt_plot_item.h>
#include <qglobal.h>
#include <qcolor.h>
//
#include "cpointerpeakdata.h"
//
class PeakItem : public QwtPlotItem
{
public:
	explicit PeakItem(const QString &title = QString::null);
	explicit PeakItem(const QwtText &title);
	virtual ~PeakItem();

	void setData( const CPointerPeakData & data );
	const CPointerPeakData & data() const;

	void setColor(const QColor &);
	QColor color() const;

	virtual QwtDoubleRect boundingRect() const;

	virtual int rtti() const;

	virtual void draw(QPainter *, const QwtScaleMap &xMap, 
		const QwtScaleMap &yMap, const QRect &) const;

	enum PeakItemAttribute
	{
		Auto = 0,
	};

	void setPeakItemAttribute(PeakItemAttribute, bool on = true);
	bool testPeakItemAttribute(PeakItemAttribute) const;

private:
	void init();

	class PrivateData;
	PrivateData *d_data;
};
#endif
